export const validatePhone = (phone) => {
  // 中国手机号验证：1开头，第二位3-9，总共11位
  const phoneRegex = /^1[3-9]\d{9}$/;
  return phoneRegex.test(phone);
};

export const validateForm = (formData) => {
  const errors = [];

  if (formData.phone && !validatePhone(formData.phone)) {
    errors.push("手机号格式不正确");
  }

  return errors;
};
